#ifndef STATETOGGLEOBJECT_H_
#define STATETOGGLEOBJECT_H_

#include "Object.h"
#include "Dictionary.h"

//this is to be used for objects that, through interaction with the user
//can be moved from the off state to the on state
class StateToggleObject : public Object
{
	bool isActive;
	bool flipOnce;
	bool alreadyFlipped;
	bool isTransitioning;
	Dictionary * gameState;
	int activeTextureIndex;
	int inactiveTextureIndex;
	Vector2D * activeTextureVertices;
	Vector2D * inactiveTextureVertices;
	Vector2D * inactiveVertices;
	Vector2D * activeVertices;
	Vector2D inactivePosition;
	Vector2D activePosition;
	Vector2D * vertexTransitionVelocity;
	int numInactiveVertices;
	int numActiveVertices;
	bool verticesTransition;
	float transitionTime;
	float currentTransitionTime;
	
	public:
	StateToggleObject( char * name, TextureManager * textureManager, Dictionary * gameState, 
					   bool isActive, bool isGrabbable, bool flipOnce,
					   Vector2D inactivePosition, Vector2D * inactiveVertices, int numInactiveVertices,
					   Vector2D activePosition, Vector2D * activeVertices, int numActiveVertices, float transitionTime,
					   char * inactiveTextureName, Vector2D * inactiveTextureVertices, 
					   char * activeTextureName, Vector2D * activeTextureVertices); 
	~StateToggleObject();
	
	virtual char * Action(Vector2D playerPos, Dictionary * gameState);
	virtual bool PreThinkEntryPoint(double elapsedTime);
};
#endif /*STATETOGGLEOBJECT_H_*/
